Distraught over the people's demand for a king, Samuel prayed to the LORD. God responded by telling him, "It is not you they have rejected, but they have rejected me as their king" (1 Sam. 8:7). God instructed Samuel to warn the people regarding the consequences of having a king (8:9). Despite the warning, the Israelites still insisted they find a king to lead them (8:19-20). Since Deuteronomy told the nation how a king in Israel ought to act, the request itself was not wrong. The motivation behind the request was wrong. Israel thought having a king would stop invasions (Judges). It was a human solution to a spiritual problem.